package com.ymatou.iapi.sellerproduct.testcase;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.json.JSONArray;
import org.json.JSONObject;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.experimental.categories.Category;

import com.ymatou.iapi.sellerproduct.parameter.CatalogLevelBean;
import com.ymatou.iapi.sellerproduct.parameter.ProdTplBean;
import com.ymatou.iapi.sellerproduct.service.ModifyReadyPutawayProductInfoV2Call;
import com.ymatou.iapi.sellerproduct.service.SaveProductTemplateCall;
import com.ymt.core.tool.Logger;
import com.ymt.utils.annotation.TestCase;
import com.ymt.utils.tag.P1;
import com.ymttest.business.service.AssertService;
import com.ymttest.business.service.LiveCallService;
import com.ymttest.business.service.NewJavaMongoCheckService;
import com.ymttest.business.service.SellerProductCallService;
import com.ymttest.database.model.YmtCatalogsI;
import com.ymttest.database.model.YmtProductsI;
import com.ymttest.database.mongo.ProductBasicInfoWapper;
import com.ymttest.database.mongo.ProductDescriptionModelWapper;
import com.ymttest.database.mongo.ProductDetailModelWapper;
import com.ymttest.database.mongo.ProductListingModelWapper;
import com.ymttest.database.mongo.ProductStockInfoWapper;
import com.ymttest.database.mongo.YmtMongoDriverFactroy;
import com.ymttest.database.sqlwapper.YmtCatalogsIWapper;
import com.ymttest.database.sqlwapper.YmtProductBrandWapper;
import com.ymttest.database.sqlwapper.YmtProductsIWapper;
import com.ymttest.utils.EnvSetup;
import com.ymttest.utils.JsonBeanHelper;
import com.ymttest.utils.MapUtil;
import com.ymttest.utils.YMTDateUtil;

public class Ts_ModifyReadyPutawayProductInfoV2 {
	private static String sellerName = EnvSetup.getData("productsellername");
	private static int sellerId = Integer.parseInt(EnvSetup.getData("productsellerid"));
	
	@BeforeClass
	public static void setUp() {
		Logger.createResultFile("App-编辑待上架商品");
	}

	@Before
	public void caseUp() {
	}

	@AfterClass
	public static void tearDown() {
		Logger.generateResult(new ModifyReadyPutawayProductInfoV2Call().getOpurl());
	}
	
	
	@After
	public void caseDown() {
		Logger.end();
	}
	
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_ModifyProductInfo_001() {
		Logger.start(true, "App-编辑待上架商品");
		try{
			
			JSONObject liveResponseBean = LiveCallService.createLiveInProgress(sellerName, sellerId);
			int liveId =  liveResponseBean.getJSONObject("Data").getInt("ActivityId");
			
			//1 发布商品 加入直播
			
			String productId = SellerProductCallService.addNewProductNotOnSale(sellerId, sellerName, MapUtil.hashMap("Product->IsNew",false)).getJSONObject("Data").getString("ProductID");
			SellerProductCallService.addProductInLive(sellerId,liveId,productId);
			
			//检查首次露出时间
			SellerProductCallService.checkListingTime(productId, YMTDateUtil.getDate());
			
			//2修改商品
			Map<String,Object> updateMap = new HashMap<String,Object>();
			updateMap.put("UserId", sellerId);
			updateMap.put("ProductId", productId);
			updateMap.put("ActivityId", liveId);
			//updateMap.put("ActivityId", "");
			
			String fileName = "modifyreadyputawayproductinfov2calltpl_001.json";
			JSONObject responseBean = new ModifyReadyPutawayProductInfoV2Call().callAndGetReturnData(fileName,updateMap);
			Logger.verifyEquals(200, responseBean.getInt("Code"), "响应报文-返回码");
			
			JSONObject requsetBean = responseBean.getJSONObject(JsonBeanHelper.JsonBeanRequest);
			
			//check DB
			//checkSQLAndMongo_ModifyProduct(requsetBean);
	
			//检查首次露出时间
			SellerProductCallService.checkListingTime(productId, YMTDateUtil.getDate());
			
			if (YmtMongoDriverFactroy.isNewJavaMgoCheck()){
				YMTDateUtil.waitTime(5);
				NewJavaMongoCheckService.checkProductMgoSyncBySQL_NewJavaMgo(productId);
			}
		}catch(Exception e){
			Logger.fail(e);
		}
		
	}
	
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_ModifyProductInfo_002() {
		Logger.start(true, "App-编辑待上架商品 template");
		try{
			
			JSONObject liveResponseBean = LiveCallService.createLiveInProgress(sellerName, sellerId);
			int liveId =  liveResponseBean.getJSONObject("Data").getInt("ActivityId");
			
			//1 发布商品 加入直播
			
			String productId = SellerProductCallService.addNewProductNotOnSale(sellerId, sellerName, MapUtil.hashMap("Product->IsNew",false)).getJSONObject("Data").getString("ProductID");
			SellerProductCallService.addProductInLive(sellerId,liveId,productId);
			
	
			//2修改商品
			SaveProductTemplateCall saveProductTemplateCall = new SaveProductTemplateCall();
			
			saveProductTemplateCall.deleteTemplate(sellerId);
			//	模版类型（1，尺码模版 2，买家须知 3，买手服务）
			ProdTplBean sizeTemplate = saveProductTemplateCall.saveTemplate(sellerId, 1);
			ProdTplBean buyerNoticeTemplate = saveProductTemplateCall.saveTemplate(sellerId, 2);
			ProdTplBean sellerServiceTemplate = saveProductTemplateCall.saveTemplate(sellerId, 3);
			
			
			Map<String,Object> updateMap = new HashMap<String,Object>();
			updateMap.put("UserId", sellerId);
			updateMap.put("ProductId", productId);
			updateMap.put("ActivityId", "");
			updateMap.put("SizeTemplateId", sizeTemplate.getTemplateId());
			updateMap.put("BuyerNoticeId", buyerNoticeTemplate.getTemplateId());
			updateMap.put("SellerServiceId", sellerServiceTemplate.getTemplateId());
			
			String fileName = "modifyreadyputawayproductinfov2calltpl_001.json";
			JSONObject responseBean = new ModifyReadyPutawayProductInfoV2Call().callAndGetReturnData(fileName,updateMap);
			Logger.verifyEquals(200, responseBean.getInt("Code"), "响应报文-返回码");
			
			//check product template
			SellerProductCallService.checkTemplateWithProd(productId, Arrays.asList(sizeTemplate,buyerNoticeTemplate,sellerServiceTemplate));
			
	
			
		}catch(Exception e){
			Logger.fail(e);
		}
		
	}
	
	
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_ModifyProductInfo_003() {
		Logger.start(true, "pc 发布商品带属性 app编辑，并且修改类目，属性删除");
		try{
			
			JSONObject liveResponseBean = LiveCallService.createLiveInProgress(sellerName, sellerId);
			int liveId =  liveResponseBean.getJSONObject("Data").getInt("ActivityId");
			
			//1 发布商品 加入直播
			Map<String, Object> thirdCategoryAndPropertyVal = SellerProductCallService.getThirdCategoryAndPropertyValue();
			
			//发布商品
			JSONObject addProductBean = JsonBeanHelper.getJsonBean("com.ymatou.iapi.sellerproduct/AddNewSellerProduct/AddNewProductTpl_Tc12.json");	
			Map<String, Object> updateMap = MapUtil.hashMap();
			updateMap.put("UserID", sellerId);
			updateMap.put("LoginID", sellerName);
			updateMap.put("Product->iThirdCategoryId", thirdCategoryAndPropertyVal.get("ThirdCategory"));
			updateMap.put("Product->PropertyList", (JSONArray)thirdCategoryAndPropertyVal.get("PropertyList"));
			
			JsonBeanHelper.updateJsonBean(addProductBean, updateMap);

			//call&获取返回报文
			JSONObject result = SellerProductCallService.addNewProduct(addProductBean);
			String productId = result.getJSONObject("Data").getString("ProductID");
			SellerProductCallService.checkProdProperty(productId,(JSONArray)thirdCategoryAndPropertyVal.get("PropertyList"));
			SellerProductCallService.addProductInLive(sellerId,liveId,productId);
			
			Map<String,Object> updateMap2 = new HashMap<String,Object>();
			updateMap2.put("UserId", sellerId);
			updateMap2.put("ProductId", productId);
			updateMap2.put("ActivityId", "");

			
			String fileName = "modifyreadyputawayproductinfov2calltpl_001.json";
			JSONObject responseBean = new ModifyReadyPutawayProductInfoV2Call().callAndGetReturnData(fileName,updateMap2);
			Logger.verifyEquals(200, responseBean.getInt("Code"), "响应报文-返回码");
			
			//check product template
			SellerProductCallService.checkProdProperty(productId,new JSONArray());
			
	
			
		}catch(Exception e){
			Logger.fail(e);
		}
		
	}
	
	
	
	
	
	
	
	
	public static void checkSQLAndMongo_ModifyProduct(JSONObject requestBean) throws Exception{
		//取出请求报文的参数
		int userId = requestBean.getInt("UserId");
		String productId = requestBean.getString("ProductId");
		String productDesc = requestBean.getString("ProductDesc");
		int tariffType = requestBean.getInt("TariffType");//包税
		int flight = requestBean.getInt("Flight");//是否包邮 0为包邮
		boolean noticeRisk = requestBean.getBoolean("NoticeRisk");//砍单风险
		int limitedNumber = requestBean.getInt("LimitedNumber");//限购数量
		int brandId = requestBean.getJSONObject("Brand").getInt("BrandId");//品牌id
		String brandName = requestBean.getJSONObject("Brand").getString("BrandName");//品牌名
		boolean isNew = requestBean.getBoolean("IsNew");//新品
		
		
		int delType = requestBean.getInt("DelType");//物流方式
		int localReturn = requestBean.getInt("LocalReturn");//退货方式
		
		String title = requestBean.getString("Title");
		
		boolean noReasonReturn = requestBean.getBoolean("NoReasonReturn"); //无理由退货
		
		CatalogLevelBean catalogLevelBean = SellerProductCallService.getProductCategroyByThirdCategoryId(requestBean.getInt("ThirdCategoryId"));
		
		//SQL -Ymt_Products
		YmtProductsI ymtProductsI = new YmtProductsIWapper().selectProductByProductId(productId).get(0);
		
		
		Map<String, Object> sqltgtMap = new HashMap<String,Object>();
		sqltgtMap.put("iUserId", userId);
		sqltgtMap.put("sProductId", productId);
		sqltgtMap.put("sProduct", title);
		sqltgtMap.put("sMobileDescription", productDesc);
		sqltgtMap.put("iTariffType", tariffType);
		sqltgtMap.put("fFlight", flight);
		sqltgtMap.put("bNoticeRisk", noticeRisk);
		sqltgtMap.put("iLimitNum", limitedNumber);
		sqltgtMap.put("iBrandId", brandId);
		sqltgtMap.put("sBrand", brandName);
		sqltgtMap.put("iDeliveryType", delType);
		sqltgtMap.put("iLocalReturn", localReturn);
		sqltgtMap.put("bNoReasonReturn", noReasonReturn);
		sqltgtMap.put("iThirdCategoryId", catalogLevelBean.getThirdCategoryId());
		sqltgtMap.put("iCategoryId", catalogLevelBean.getSecondCategoryId());
		
		AssertService.assertResultEqual(sqltgtMap, MapUtil.pojoToMap(ymtProductsI),"SQL-Ymt_Products");
		
		//基础项，一层数据检查
		//check Mongo
		if (YmtMongoDriverFactroy.isOldMongoCheck()){
			//ProductBasicInfo
			Map<String, Object> productBasicMap = new ProductBasicInfoWapper().getByProductId(productId);
			
			Map<String, Object> mongoTgtMap = new HashMap<String,Object>();
			mongoTgtMap.put("ProductId", productId);
			mongoTgtMap.put("Name", title);
			mongoTgtMap.put("SellerId", userId);
			mongoTgtMap.put("MobileDescription", productDesc);
			mongoTgtMap.put("TariffType", tariffType);
			mongoTgtMap.put("Freight", flight);
			mongoTgtMap.put("NoticeRisk", noticeRisk);
			mongoTgtMap.put("LimitNum", limitedNumber);
			mongoTgtMap.put("BrandId", brandId);
			mongoTgtMap.put("BrandEnName", brandName);
			
			//品牌中文名
			String sBrand = new YmtProductBrandWapper().getProductBrandByBrandId(brandId).get(0).get("sBrand").toString();
			if (!sBrand.equals("")){
				mongoTgtMap.put("BrandName", sBrand);
			}
			
			mongoTgtMap.put("DeliveryMethod", delType);
			mongoTgtMap.put("LocalReturn", localReturn);
			mongoTgtMap.put("NoReasonReturn", noReasonReturn);
			mongoTgtMap.put("ThirdCategoryId", catalogLevelBean.getThirdCategoryId());
			mongoTgtMap.put("CategoryId", catalogLevelBean.getSecondCategoryId());
			mongoTgtMap.put("MasterCategoryId", catalogLevelBean.getMasterCategoryId());
			mongoTgtMap.put("ThirdCategoryName", catalogLevelBean.getThirdCategoryName());
			mongoTgtMap.put("CategoryName", catalogLevelBean.getSecondCategoryName());
			mongoTgtMap.put("MasterCategoryName", catalogLevelBean.getMasterCategoryName());
		
			AssertService.assertResultEqual(mongoTgtMap, productBasicMap,"Mongo-ProductBasicInfo");
		}
		
		
		
		if (YmtMongoDriverFactroy.isNewMongoCheck()){
			//ProductDetailModel
			Map<String, Object> productDetailMap = new ProductDetailModelWapper().getProductId(productId);
			
			Map<String, Object> mongoTgtMap = new HashMap<String,Object>();
			mongoTgtMap.put("ProductId", productId);
			mongoTgtMap.put("Title", title);
			mongoTgtMap.put("Introduction", productDesc);
			mongoTgtMap.put("SellerId", userId);
			mongoTgtMap.put("LimitNum", limitedNumber);
			mongoTgtMap.put("BrandId", brandId);
			mongoTgtMap.put("BrandEnName", brandName);
			
			//品牌中文名
			String sBrand = new YmtProductBrandWapper().getProductBrandByBrandId(brandId).get(0).get("sBrand").toString();
			if (!sBrand.equals("")){
				mongoTgtMap.put("BrandName", sBrand);
			}
			
			mongoTgtMap.put("TariffType", tariffType);
			mongoTgtMap.put("Freight", flight);
			mongoTgtMap.put("NoticeRisk", noticeRisk);
			mongoTgtMap.put("DeliveryMethod", delType);
			mongoTgtMap.put("LocalReturn", localReturn);
			mongoTgtMap.put("NoReasonReturn", noReasonReturn);
			mongoTgtMap.put("ThirdCategoryId", catalogLevelBean.getThirdCategoryId());
			mongoTgtMap.put("CategoryId", catalogLevelBean.getSecondCategoryId());
			mongoTgtMap.put("MasterCategoryId", catalogLevelBean.getMasterCategoryId());
			mongoTgtMap.put("ThirdCategoryName", catalogLevelBean.getThirdCategoryName());
			mongoTgtMap.put("CategoryName", catalogLevelBean.getSecondCategoryName());
			mongoTgtMap.put("MasterCategoryName", catalogLevelBean.getMasterCategoryName());
			
			
			AssertService.assertResultEqual(mongoTgtMap, productDetailMap,"Mongo-ProductDetailModel");
			
			//ProductListing
			Map<String, Object> productListMap = new ProductListingModelWapper().getProductId(productId);
			
			AssertService.assertResultEqual(MapUtil.hashMap("Title", title), productListMap,"Mongo-ProductDetailModel");
			
		}
		
		
		//check ProductDescription
		checkSQLAndMongoDesc(productId,requestBean.getJSONObject("ProductDescription"));
		
		//check catalogs
		checkSQLAndMongoCatalogs(productId,requestBean.getJSONArray("NewCatalogs"));
		
		
	}
	
	
	
	private static void checkSQLAndMongoDesc(String productId,JSONObject descBean) throws Exception{
		String desc = descBean.getString("Description");
		JSONArray picUrls = descBean.getJSONArray("PicUrls");	
		
		Map<String,Object> productDescriptionMap = new ProductDescriptionModelWapper().getProductId(productId);
		String actDesc = productDescriptionMap.get("Description").toString();
		Logger.verifyIsContains(desc, actDesc, "Mongo-ProductDescriptionModel description");
		for(int i=0;i<picUrls.length();i++ ){
			Logger.verifyIsContains(picUrls.getString(i), actDesc, "Mongo-ProductDescriptionModel description");
		}
		
	}
	
	//通过product code数量区分规格
	private static void checkSQLAndMongoCatalogs(String productId,JSONArray catalogsBean) throws Exception{
		
		//Mongo
		YmtCatalogsIWapper ymtCatalogsIWapper = new YmtCatalogsIWapper();
		ProductBasicInfoWapper productBasicInfoWapper= new ProductBasicInfoWapper();
		ProductDetailModelWapper productDetailModelWapper= new ProductDetailModelWapper();
		
		
		int catalogSize = catalogsBean.length();
		Double MaxPrice = (double) -1;
		Double MinPrice = (double) -1;
		
		//SQL Ymt_Catalogs
		List<YmtCatalogsI> ymtCatalogsIList = ymtCatalogsIWapper.selectCatalogsByProductId(productId);
		List<YmtCatalogsI> ymtCatalogsIListAction0 = new ArrayList<YmtCatalogsI>();
		for(YmtCatalogsI y:ymtCatalogsIList){
			if (y.getiAction()==0){
				ymtCatalogsIListAction0.add(y);
			}
		}
		Logger.verifyEquals(catalogSize, ymtCatalogsIListAction0.size(), "SQL-Ymt_Catalogs 规格数量");
		
		//New Mongo - ProductDetailModel
		if (YmtMongoDriverFactroy.isNewMongoCheck()){
			JSONArray CatalogList = new JSONArray(productDetailModelWapper.getProductId(productId).get("CatalogList").toString());
			Logger.verifyEquals(catalogSize, CatalogList.length(), "Mongo-ProductDetailModel CatalogList 规格数量");
		}
		
		
		//遍历catalogList 检查
		for (int i=0;i<catalogSize;i++){
			JSONObject catalogs = catalogsBean.getJSONObject(i);
			Double price = catalogs.getDouble("Price");
			Double vipPrice = catalogs.getDouble("VipPrice");
			//Double earnestPrice = catalogs.getDouble("EarnestPrice"); 定金字段 不维护了
			Double newCustomerPrice = catalogs.getDouble("NewCustomerPrice");
			int numStock = catalogs.getInt("Num");
			String productCode = catalogs.getString("ProductCode");
			
			
			//get CatalogId by product code
			String catalogId = "";
			YmtCatalogsI ymtCatalogsI = null;
			for(YmtCatalogsI y:ymtCatalogsIListAction0){
				if (y.getsProductCode().equals(productCode)){
					catalogId = y.getsCatalogId();
					ymtCatalogsI = y;
					break;
				}
			}
			
			//SQL Ymt_Catalogs
			Map<String, Object> sqlTgtMap = new HashMap<String,Object>();
			sqlTgtMap.put("sProductId", productId);
			sqlTgtMap.put("sCatalogId", catalogId);
			sqlTgtMap.put("iNum", numStock);
			sqlTgtMap.put("fQuotePrice", price);
			sqlTgtMap.put("fVipPrice", vipPrice);
			sqlTgtMap.put("fNewCustomerPrice", newCustomerPrice);
			sqlTgtMap.put("sProductCode", productCode);
			
			AssertService.assertResultEqual(sqlTgtMap, MapUtil.pojoToMap(ymtCatalogsI),"SQL-YmtCatalogs");
			
			
			//Mongo
			if (YmtMongoDriverFactroy.isOldMongoCheck()){
				//ProductStockInfo
				Map<String, Object> mongoTgtMap = new HashMap<String,Object>();
				mongoTgtMap.put("ProductId", productId);
				mongoTgtMap.put("CatalogId", catalogId);
				mongoTgtMap.put("Price", price);
				mongoTgtMap.put("NewGuestPrice", newCustomerPrice);
				mongoTgtMap.put("VipPrice", vipPrice);
				mongoTgtMap.put("StockNum", numStock);
				
				AssertService.assertResultEqual(mongoTgtMap,new ProductStockInfoWapper().getByCatalogId(catalogId));
			}
			
			if (YmtMongoDriverFactroy.isNewMongoCheck()){
				JSONArray CatalogList = new JSONArray(productDetailModelWapper.getProductId(productId).get("CatalogList").toString());
				boolean isFoundCatalog = false;
				for(int k=0;k<CatalogList.length();k++){
					if (CatalogList.isNull(k)){
						Logger.verifyIsNull(CatalogList.get(k), "CatalogList 第["+k+"] 为空");
						break;
					}
					
					
					//获取对应catalogId的数据
					if (CatalogList.getJSONObject(k).getString("CatalogId").equals(catalogId)){
						//库存
						Logger.verifyEquals(numStock, CatalogList.getJSONObject(k).getJSONArray("StockList").getJSONObject(0).getInt("Stock"), "ProductDetailModel-Stock");
						
						isFoundCatalog = true;
						JSONArray PriceList = CatalogList.getJSONObject(k).getJSONArray("PriceList");
						for(int m=0;m<PriceList.length();m++){
							Double tmpPrice = (double) -1;
							switch(PriceList.getJSONObject(m).getInt("PriceType"))
							{
							//0 原价
							case 0:
								tmpPrice = price;
								break;
							//1 直播新客价
							case 1:
								tmpPrice = newCustomerPrice;
								break;	
							//2  VIP价
							case 2:
								tmpPrice = vipPrice;
								break;
							default:
								break;
							}
							
							if(tmpPrice>0){
								Logger.verifyEquals(tmpPrice, Double.parseDouble(PriceList.getJSONObject(m).getString("Price")), 
											"ProductDetailModel-Price, type["+PriceList.getJSONObject(m).getInt("PriceType")+"]");
							}
						}
						
						
						//Propertys
						JSONArray PropertyList = CatalogList.getJSONObject(k).getJSONArray("PropertyList");
						JSONArray CatalogPropertys = catalogs.getJSONArray("CatalogPropertys");
						Logger.verifyEquals(CatalogPropertys.length(), PropertyList.length(), "ProductDetailModel- PropertyList size");
						
						for(int j=0;j<CatalogPropertys.length();j++){
							JSONObject CatalogProperty =  CatalogPropertys.getJSONObject(j);
							String property = CatalogProperty.getString("Property");
							String attributes = CatalogProperty.getString("Attributes");
							for (int l=0;l<PropertyList.length();l++){
								if (PropertyList.getJSONObject(l).getString("Name").equals(property)){
									Logger.verifyEquals(property, PropertyList.getJSONObject(l).getString("Name"), "ProductDetailModel - PropertyList Name");
									Logger.verifyEquals(attributes, PropertyList.getJSONObject(l).getString("Value"), "ProductDetailModel - PropertyList Value");
								}
							}
						}
						break;
					}
				}
				Logger.verifyEquals(true, isFoundCatalog, "catalogId ["+catalogId+"] should be exist");
			}
			
			
			
			//set max & min price 
			if (MaxPrice ==-1&&MinPrice==-1){
				MaxPrice = price;
				MinPrice = price;
			}else{
				MaxPrice = (price>MaxPrice)?price:MaxPrice;
				MinPrice = (price<MinPrice)?price:MinPrice;
			}
			
			
		}
		
		// check max & min price 
		if (YmtMongoDriverFactroy.isOldMongoCheck()){
			AssertService.assertResultEqual(MapUtil.hashMap("MaxCatalogPrice", MaxPrice, "MinCatalogPrice", MinPrice), productBasicInfoWapper.getByProductId(productId));
		}
		
		if (YmtMongoDriverFactroy.isNewMongoCheck()){
			AssertService.assertResultEqual(MapUtil.hashMap("MaxCatalogPrice", MaxPrice, "MinCatalogPrice", MinPrice), productDetailModelWapper.getProductId(productId));
			AssertService.assertResultEqual(MapUtil.hashMap("MaxCatalogPrice", MaxPrice, "MinCatalogPrice", MinPrice), new ProductListingModelWapper().getProductId(productId));
			
		}
		
		
		
		
		
	}

	
	public static void main(String[] args) throws Exception {
		NewJavaMongoCheckService.checkProductMgoSyncBySQL_NewJavaMgo("715b0cc6-d873-4f15-b560-763672d40ac1");
	}
	
	
}
